/*河南星辰软件科技有限公司
@copyright Copyright (c) 2010~2022 All rights reserved.
*/
package cn.javaxc.psi.action.supplychainmana;
import java.io.*;
import java.util.*;
import java.sql.*;
import cn.javaxc.model.base.SQL;
import cn.javaxc.model.base.SQLList;
import cn.javaxc.model.base.SQLMap;
import cn.javaxc.model.base.SQLParam;
import cn.javaxc.model.page.BatisPage;
import cn.javaxc.mvcwork.controller.web.TreeBean;
import cn.javaxc.mvcwork.util.common.CommonUtil;
import cn.javaxc.mvcwork.util.common.MapListUtil;
import cn.javaxc.mvcwork.util.helper.FrameHelper;
import cn.javaxc.mvcwork.util.helper.TreeTableHelper;
import org.springframework.beans.factory.annotation.Autowired;
import cn.javaxc.system.action.base.BaseAction;
import cn.javaxc.psi.mapper.supplychainmana.ProcurementContractMapper;
public class ProcurementContractAction extends BaseAction
{
    @Autowired(required=false)
	private ProcurementContractMapper mapper;
    /**
    采购合同统计图
    */
    
    public Map procurementContract() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        TreeBean tb;
        
        SQLList<SQLMap> s_parent=mapper.s_parent(params);
        SQLMap s_parent_emt=s_parent.getExistfirst();
        result.put("s_parent", s_parent_emt);
        
        
        result.put("s_search", pagination.getSearchParas());
        
        
        tb = createTreeBean("l_firm_treecols");
        tb.setPrefix("img");
        SQLList<SQLMap> l_firm=mapper.l_firm(params);
        l_firm = l_firm.buildTree(tb,tb.getPid());
        result.put("l_firm", l_firm);
        
        
        params.def("CMID7",-1);
        params.def("CMID8",-1);
        SQLList<SQLMap> s_s=mapper.s_s(params);
        SQLMap s_s_emt=s_s.getExistfirst();
        result.put("s_s", s_s_emt);
        
        
        params.def("CMID7",-1);
        Object CMID7 =mapper.CMID7(params);
        result.put("CMID7", CMID7);
        
        
        SQLList<SQLMap> s_person=mapper.s_person(params);
        s_person.setSelectNone("全部");
        result.put("s_person", s_person);
        
        
        params.def("CMID8",-1);
        Object CMID8 =mapper.CMID8(params);
        result.put("CMID8", CMID8);
        
        
        SQLList<SQLMap> all=mapper.all(params);
        result.put("all", all);
        
        return result;
    }
    /**
    */
    
    public Object s_price() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> s_price=mapper.s_price(params,pagination);
        s_price.setPagedListInfo(pagination);
        result.put("s_price", s_price);
        
        return s_price;
    }
    /**
    饼状统计图
    */
    
    public Map pancakeContractSupply() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        
        
        SQLList<SQLMap> s_c=mapper.s_c(params);
        result.put("s_c", s_c);
        
        return result;
    }
    /**
    合同明细
    */
    
    public Map contractDetailsSupply() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> produce=mapper.produce(params);
        result.put("produce", produce);
        
        
        SQLList<SQLMap> price=mapper.price(params);
        result.put("price", price);
        
        
        SQLList<SQLMap> quo=mapper.quo(params);
        SQLMap quo_emt=quo.getExistfirst();
        result.put("quo", quo_emt);
        
        
        SQLList<SQLMap> pum=mapper.pum(params);
        result.put("pum", pum);
        
        
        SQLList<SQLMap> s_bank=mapper.s_bank(params);
        result.put("s_bank", s_bank);
        
        
        SQLList<SQLMap> s_demand=mapper.s_demand(params);
        result.put("s_demand", s_demand);
        
        
        SQLList<SQLMap> s_breakduty=mapper.s_breakduty(params);
        result.put("s_breakduty", s_breakduty);
        
        
        SQLList<SQLMap> s_pay=mapper.s_pay(params);
        result.put("s_pay", s_pay);
        
        
        SQLList<SQLMap> s_duty=mapper.s_duty(params);
        result.put("s_duty", s_duty);
        
        
        SQLList<SQLMap> s_num=mapper.s_num(params);
        SQLMap s_num_emt=s_num.getExistfirst();
        result.put("s_num", s_num_emt);
        
        return result;
    }
    /**
    合同明细
    */
    
    public Map contractDetailsSupplys() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> produce=mapper.produce(params);
        result.put("produce", produce);
        
        
        SQLList<SQLMap> price=mapper.price(params);
        result.put("price", price);
        
        
        SQLList<SQLMap> quo=mapper.quo(params);
        SQLMap quo_emt=quo.getExistfirst();
        result.put("quo", quo_emt);
        
        
        SQLList<SQLMap> pum=mapper.pum(params);
        result.put("pum", pum);
        
        
        SQLList<SQLMap> s_bank=mapper.s_bank(params);
        result.put("s_bank", s_bank);
        
        
        SQLList<SQLMap> s_demand=mapper.s_demand(params);
        result.put("s_demand", s_demand);
        
        
        SQLList<SQLMap> s_breakduty=mapper.s_breakduty(params);
        result.put("s_breakduty", s_breakduty);
        
        
        SQLList<SQLMap> s_pay=mapper.s_pay(params);
        result.put("s_pay", s_pay);
        
        
        SQLList<SQLMap> s_duty=mapper.s_duty(params);
        result.put("s_duty", s_duty);
        
        
        SQLList<SQLMap> s_num=mapper.s_num(params);
        SQLMap s_num_emt=s_num.getExistfirst();
        result.put("s_num", s_num_emt);
        
        return result;
    }
    /**
    */
    
    public Map d_quo() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        mapper.d_quo(params);
        
        return result;
    }
    /**
    */
    
    public Map d_producenum() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        mapper.d_producenum(params);
        
        return result;
    }
    /**
    */
    
    public Map d_bank() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        mapper.d_bank(params);
        
        return result;
    }
    /**
    */
    
    public Map d_duty() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        mapper.d_duty(params);
        
        return result;
    }
    /**
    */
    
    public Map d_pay() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        mapper.d_pay(params);
        
        return result;
    }
    /**
    */
    
    public Map d_breakduty() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        mapper.d_breakduty(params);
        
        return result;
    }
    /**
    */
    
    public Map d_demand() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        mapper.d_demand(params);
        
        return result;
    }
}